package com.chrilwe.pigpig.filesystem.message;

import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
  * 消息发送
 * @author chrilwe
 * @date 2020-10-5
 */
@Component
public class MqMessageSender {
	
	@Autowired
	private RabbitTemplate rabbitTemplate;
	
	public void send(String exchange, String routingKey, String message) {
		rabbitTemplate.convertAndSend(exchange, routingKey, message);
	}
	
}
